﻿@model DPUWebPhet10.Models.CheckPasswordModel
@using DPUWebPhet10.Helpers
@using PagedList.Mvc;
@{
    ViewBag.Title = "ตรวจสอบรหัสผ่าน";
    Layout = "~/Views/Shared/_Managementlayout.cshtml";

    int seq = 1;
}
@{
    <!-- Content -->
    <div class="full_w">
        <div class="h_title">
            Manage pages - Check Password</div>
        @using (Html.BeginForm("CheckPassword", "Account"))
        {
            <p>
                ป้อนชื่อโรงเรียนที่ต้องการค้นหา
                @Html.TextBoxFor(model => model.school, new { style = "width: 300px" })
                <input type="submit" class="button" value="ค้นหา" style="width: 50px" />
            </p>
            <div class="entry">
                <div class="sep">
                </div>
            </div>
        }
        <div>
            @if (Model.schools != null)
            {
            
                <table class="table" width="65%">
                    <thead>
                        <tr>
                            <th>
                                ลำดับ
                            </th>
                            <th>
                                ชื่อโรงเรียน
                            </th>
                            <th>
                                อีเมล์
                            </th>
                            <th>
                                รหัสผ่าน
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach (var result in Model.schools)
                        {
                            <tr>
                                <td>
                                    @seq
                                </td>
                                <td>@result.SCHOOL_NAME
                                </td>
                                <td>@result.SCHOOL_EMAIL
                                </td>
                                <td>@result.SCHOOL_PASSWORD
                                </td>
                            </tr>
                        
                            seq++;
                        }
                    </tbody>
                    <tfoot>
                        <tr>
                            @*                        <td colspan="4">
                            @Html.PagedListPager(Model.schools,
            page => Url.Action("CheckPassword", new RouteValueDictionary() {
               { "Page", page }
            }),
            PagedListRenderOptions.MinimalWithPageCountText)
                        </td>*@
                        </tr>
                    </tfoot>
                </table>

            }
            @if (Model.schools != null)
            {
                if (Model.schools.Count == 0)
                {
                <!-- Not found data -->
                <div style="text-align: center; color: Red">
                    <h2>
                        @Html.Label("ไม่พบข้อมูล")
                    </h2>
                </div>

                }
            }
        </div>
    </div>
    <!-- End Content -->
    
}
@section Scripts {
    <script type="text/javascript">
        $(document).ready(function () {
        });
    </script>
}
